<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<style>
			*{/*权值 0  很容易被覆盖*/
				color: #ffaa00 !important;
				background: #55ffff !important;
			}
			div{/*权值 1 */
				color: #00ff00;
				background: #ff557f;
			}
			.d1{/*权值 10*/
				color: #ff0000;
				background: #aaff00;
			}
			div.d1{/*选择器权值之和*/
				color: #55ff00;
				background: #ff0000;
			}
			bady div.d1{/*权值12*/
			font-size: 25px;
			color: #000000;
			background: #ff0000;
			}
			#d1{/*权值100*/
				font-size: 15px;
				color: 3aaaaff;
				background:#aaff00;
			}
			div#d1{/*权值101*/
				font-size: 20px;
				color: #51ff21;
				background: #ff20bc;
			}
			div#d1:hover{/*权值111*/
				color: #aaaaff;
				background: #aaff00;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color:red">Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam perspiciatis, explicabo nobis non exercitationem animi vero et reiciendis nulla doloremque nisi ut, quidem aspernatur asperiores iure nesciunt, recusandae pariatur! Amet.</div>
	</body>
</html>